from utils.base import BaseSerializer
from apps.scripts.models import PythonScript

from rest_framework import serializers


class PythonScriptSerializers(BaseSerializer):
    module_name = serializers.CharField(source='module.name', read_only=True)
    plant_name = serializers.CharField(source='module.plant.name', read_only=True)

    class Meta:
        model = PythonScript
        fields = '__all__'

